

** descriptive statistics **
use data1.dta,clear
global Firmvars "Size Lev ROA Cashflow TobinQ Board Indep Dual Top1"
outreg2 using Table1.doc, replace sum(detail) keep(FOPT2 gwprobability rank_gw $Firmvars) title(Decriptive statistics)



** baseline **
use data1.dta,clear
reghdfe FOPT2 gwprobability $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table2.doc,replace tstat bdec(3) tdec(2) ctitle(FOPT)
reghdfe FOPT2 rank_gw $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table2.doc,append tstat bdec(3) tdec(2) ctitle(FOPT)

** Mechanism **
use data1.dta,clear
* (1) *
reghdfe FOPT2 analyst_gw gwprobability analystcoverage $Firmvars , absorb(code year) cluster(code)
outreg2 using Table3.doc,replace tstat bdec(3) tdec(2) ctitle(ILLIQ)
* (2) *
reghdfe FOPT2 analyst_gwr rank_gw analystcoverage $Firmvars , absorb(code year) cluster(code)
outreg2 using Table3.doc,append tstat bdec(3) tdec(2) ctitle(ILLIQ)

* (3) *
reghdfe FOPT2 Ins_gw gwprobability InsInvestorProp $Firmvars , absorb(code year) cluster(code)
outreg2 using Table3.doc,append tstat bdec(3) tdec(2) ctitle(FOPT2)
* (4) *
reghdfe FOPT2 Ins_gwr rank_gw InsInvestorProp $Firmvars , absorb(code year) cluster(code)
outreg2 using Table3.doc,append tstat bdec(3) tdec(2) ctitle(FOPT2)

* (5) *
reghdfe FOPT2 big4_gw gwprobability Big4 $Firmvars , absorb(code year) cluster(code)
outreg2 using Table3.doc,append tstat bdec(3) tdec(2) ctitle(FOPT2)
* (6) *
reghdfe FOPT2 big4_gwr rank_gw Big4 $Firmvars , absorb(code year) cluster(code)
outreg2 using Table3.doc,append tstat bdec(3) tdec(2) ctitle(FOPT2)







** Heterogeneity **
use data1.dta,clear
* (1) *
reghdfe FOPT2 gw_market gwprobability market2 $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table4.doc,replace tstat bdec(3) tdec(2) ctitle(FOPT)
* (2) *
reghdfe FOPT2 gwr_market rank_gw market2 $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table4.doc,append tstat bdec(3) tdec(2) ctitle(FOPT)
* (3) *
reghdfe FOPT2 gw_centrol gwprobability  $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table4.doc,append tstat bdec(3) tdec(2) ctitle(FOPT)
* (4) *
reghdfe FOPT2 gwr_centrol rank_gw  $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table4.doc,append tstat bdec(3) tdec(2) ctitle(FOPT)




****** robust ******



** DID **
use data1.dta,clear
xtset code year
gen pre5 = year-treat_year <=-5 & !missing(treat_year)
gen pre4 = year-treat_year ==-4 & !missing(treat_year)
gen pre3 = year-treat_year ==-3 & !missing(treat_year)
gen pre2 = year-treat_year ==-2 & !missing(treat_year)
gen pre1 = year-treat_year ==-1 & !missing(treat_year)
gen pre0 = year-treat_year ==0 & !missing(treat_year)
gen post1 = year-treat_year ==1 & !missing(treat_year)
gen post2 = year-treat_year ==2 & !missing(treat_year)
gen post3 = year-treat_year ==3 & !missing(treat_year)
gen post4 = year-treat_year ==4 & !missing(treat_year)
gen post5 = year-treat_year >=5 & !missing(treat_year)

* (1) *
reghdfe gwprobability did $Firmvars , absorb(code year) cluster(code)
outreg2 using Table5.doc,replace tstat bdec(3) tdec(2) ctitle(FOPT) 
* (2) *
reghdfe gwprobability  pre4 pre3 pre2 pre1 pre0 post1 post2 post3 post4 post5 $Firmvars , absorb(code year) cluster(code)
outreg2 using Table5.doc,append tstat bdec(3) tdec(2) ctitle(FOPT) 

* (3) *
reghdfe FOPT2 did $Firmvars , absorb(code year) cluster(code)
outreg2 using Table5.doc,append tstat bdec(3) tdec(2) ctitle(FOPT) 
* (4) *
reghdfe FOPT2  pre4 pre3 pre2 pre1 pre0 post1 post2 post3 post4 post5 $Firmvars , absorb(code year) cluster(code)
outreg2 using Table5.doc,append tstat bdec(3) tdec(2) ctitle(FOPT) 



** Total forecast bias **
use data1.dta,clear
* (1) *
reghdfe FERR2 gwprobability $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table6.doc,replace tstat bdec(3) tdec(2) ctitle(FERR2)
* (2) *
reghdfe FERR2 rank_gw $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table6.doc,append tstat bdec(3) tdec(2) ctitle(FERR2)


** Alternative greenwash measurement **
use data1.dta,clear
winsor2 gws row_avg,cut(1 99) replace
reghdfe FOPT2 gws $Firmvars , absorb(code year) cluster(code)
outreg2 using Table7.doc,replace tstat bdec(3) tdec(2) ctitle(FOPT2)
reghdfe FOPT2 row_avg $Firmvars , absorb(code year) cluster(code)
outreg2 using Table7.doc,append tstat bdec(3) tdec(2) ctitle(FOPT2)



** Robustness in subsamples **
* Heavily polluting firms *
use data1.dta,clear
gen ifhp = 0
replace ifhp=1 if industry=="B06" | industry=="B07" | industry=="B08" | industry=="B09" | industry=="B10" | industry=="B11" | industry=="B12" | industry=="B15" | industry=="C17" | industry=="C18" | industry=="C19" | industry=="C22" |  industry=="C25" | industry=="C26" | industry=="C27" | industry=="C28" | industry=="C29" | industry=="C30" |industry=="C31" | industry=="C32" |industry=="D44"
drop if ifhp == 1
reghdfe FOPT2 gwprobability  $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table8.doc,replace tstat bdec(3) tdec(2) ctitle(FOPT)
reghdfe FOPT2 rank_gw  $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table8.doc,append tstat bdec(3) tdec(2) ctitle(FOPT)

* State-owned enterprises *
use data1.dta,clear
drop if SOE == 1
* (1) *
reghdfe FOPT2 gwprobability $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table8.doc,append tstat bdec(3) tdec(2) ctitle(FOPT)
* (2) *
reghdfe FOPT2 rank_gw  $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table8.doc,append tstat bdec(3) tdec(2) ctitle(FOPT)

* First-tier cities *
use data1.dta,clear
drop if City == "深圳市"
drop if City == "北京市"
drop if City == "广州市"
drop if City == "上海市"
* (5) *
reghdfe FOPT2 gwprobability  $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table8.doc,append tstat bdec(3) tdec(2) ctitle(FOPT)
* (6) *
reghdfe FOPT2 rank_gw  $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table8.doc,append tstat bdec(3) tdec(2) ctitle(FOPT)



** Price informativeness **
use data1.dta,clear
winsor2 VPIN SYN3 ,cut(1 99) replace
* (1) *
reghdfe VPIN  gwprobability  $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table9.doc,replace tstat bdec(3) tdec(2) ctitle(FOPT)
* (2) *
reghdfe VPIN  rank_gw  $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table9.doc,append tstat bdec(3) tdec(2) ctitle(FOPT)
* (3) *
reghdfe SYN3  gwprobability  $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table9.doc,append tstat bdec(3) tdec(2) ctitle(FOPT)
* (4) *
reghdfe SYN3  rank_gw  $Firmvars ,absorb(code year) cluster(code)
outreg2 using Table9.doc,append tstat bdec(3) tdec(2) ctitle(FOPT)








